# # # # # import os
# # # # #
# # # # # from commons.get_path import get_all_files
# # # # #
# # # # # a = r"D:\UICESHI\UI\utils\config\config.ini"
# # # # # # print(os.path.dirname(a))  # D:\UICESHI\UI\utils\config
# # # # # # print(os.path.abspath(a))  # D:\UICESHI\UI\utils\config\config.ini
# # # # # # print(os.path.dirname(os.path.dirname(os.path.abspath(a))))  # D:\UICESHI\UI\utils
# # # # # # print(os.path.dirname(os.path.dirname(a)))  # D:\UICESHI\UI\utils
# # # # # # print(get_all_files("testcase"))
# # # # # print(os.path.join(os.path.dirname(os.path.dirname(a)), "logs", ""))
# # # # import json
# # # #
# # # from webdriver_manager.chrome import ChromeDriverManager
# # # from webdriver_manager.firefox import GeckoDriverManager
# # # from webdriver_manager.microsoft import IEDriverManager
# # #
# # # from commons.get_path import get_all_files, ensure_path_sep
# # # #
# # # # # a = {"a": "A", "b": "B"}
# # # # # for k, v in a.items():
# # # # #     print(k, v)
# # # # # p = {k: v for k, v in a.items()}
# # # # # print(p)
# # # # # # run_case_data = {k: v for k, v in data['statistic'].items() if k in keep_keys}
# # # #
# # # from selenium import webdriver
# # # import threading
# # #
# # # from utils.config.read_ini import config
# # #
# # #
# # # #
# # # # def Browser(browser):
# # # #     if browser == "Ie":
# # # #         driver = webdriver.Ie(IEDriverManager().install())
# # # #         return driver
# # # #     elif browser == "firefox":
# # # #         driver = webdriver.Firefox(executable_path=GeckoDriverManager().install())
# # # #         return driver
# # # #     elif browser == "chrome":
# # # #         driver = webdriver.Chrome(ChromeDriverManager().install())
# # # #         return driver
# # # #     else:
# # # #         print('输入的正确的浏览器信息')
# # # def get_browser_engine(browser):
# # #     if browser == 'Firefox' or browser == 'firefox' or browser == '火狐':
# # #         driver = webdriver.Firefox(executable_path=GeckoDriverManager().install())
# # #         return driver
# # #     elif browser == 'Ie' or browser == 'ie':
# # #         driver = webdriver.Ie(IEDriverManager().install())
# # #         return driver
# # #     # elif browser == 'Edge':
# # #     #     driver = webdriver.Edge(EdgeChromiumDriverManager().install())
# # #     # return driver
# # #     elif browser == 'Chrome' or browser == 'chrome' or browser == '谷歌':
# # #         # 隐藏浏览器界面
# # #         # chrome_option = Options()
# # #         # chrome_option.add_argument('--headless')
# # #         # chrome_option.add_argument('--disable-gpu')
# # #         # driver = webdriver.Chrome(options=chrome_option)
# # #         # 自动下载浏览器对应版本的驱动
# # #         driver = webdriver.Chrome(ChromeDriverManager().install())
# # #         return driver
# # #     else:
# # #         print("请输入的正确的浏览器")
# # #
# # #
# # # def test_ecshop_login(browser_name):
# # #     driver = get_browser_engine(browser_name)
# # #     driver.get('http://www.baidu.com')
# # #     driver.maximize_window()
# # #     print('%s浏览器执行成功' % browser_name)
# # #
# # #
# # # def run_case(name):
# # #     thread_list = []
# # #     thread = threading.Thread(target=test_ecshop_login, args=(name,))
# # #     thread_list.append(thread)
# # #     for j in thread_list:
# # #         j.start()
# # #
# # #
# # # if __name__ == '__main__':
# # #     browser_obj = []
# # #     b = input("请输入执行测试的浏览器:")
# # #     browser_obj.append(b)
# # #     for i in browser_obj:
# # #         run_case(i)
# # #
# # # #
# # # #
# # # #
# # # # if __name__ == '__main__':
# # # #     get_browser_engine()
# # import configparser
# #
# # #
# # # from selenium import webdriver
# # # from webdriver_manager.chrome import ChromeDriverManager
# # # from webdriver_manager.microsoft import IEDriverManager
# # # def get_browser_engine():
# # #     driver = webdriver.Ie(IEDriverManager().install())
# # #     return driver
# # # print(get_browser_engine())
# #
# #
# # config = configparser.ConfigParser()
# # # with open(r'D:\UICESHI\UI\utils\config\config.ini', encoding='utf-8') as fp:
# # #     config.read(fp)
# # config.add_section("browserType")
# # config.set('browserType', 'browserName', 'ie')
# # config.write(open(r'D:\UICESHI\UI\config.ini', 'w'))
# # items = config.items("browserType")
# # print(items)
# # # print(config.sections())
# #
# #
# #
# #
# #
# # ;[tester]
# # ;tester_name = renee
# # ;
# # [browserType]
# # browserName = chrome
# #
# # ;[testServer2]
# # ;url = https://erp-scm2.whgxwl.com/YX_kVc2yo2cmw0U
# # ;
# # ;[testServer3]
# # ;url = https://%(url)s.whgxwl.com/YX_kVc2yo2cmw0U/
# # ;
# # ;[mysql_db]
# # ;switch = False
# # ;host = fs-mysql-5-7-cn.mysql.rds.aliyuncs.com
# # ;user = fs_devops
# # ;password = "azpcup88Kgw0kQBn"
# # ;port = 13307
# # ;
# # ;[lark]
# # ;webhook = https://open.feishu.cn/open-apis/bot/v2/hook/65b60447-64b8-415b-b58b-f560fe9c7ba0
# # ;
# # ;[email]
# # ;send_user_list = 1050905704@qq.com
# # ;addressee_list = 1050905704@qq.com
# # ;
# # ;[wechat]
# # ;webhook =
# # ;
# # ;[ding_talk]
# # ;webhook =
# # ;secret =
# # ;
# # ;
# # [browserType]
# # browsername = chrome
# #
# import configparser
# import os
#
# from commons.get_path import root_path
# from utils.config.write_ini import writ
#
# config = configparser.ConfigParser()
# config_path = os.path.join(root_path(), "config.ini")
# config.read(config_path)
#
# if 'browserType' in config.sections():
#     config.remove_section('browserType')
#     config.add_section('browserType')
#     if 'browserName' in config.options('browserType'):
#         config.remove_option('testServer', 'c')
#         browser = input("请输入执行测试的浏览器：")
#         config.set('browserType', 'browserName', browser)
#
#
# config.set('DEFAULT', 'url', 'https://%(c)s.whgxwl.com/YX_kVc2yo2cmw0U/')
#
#
# if 'testServer' in config.sections():
#     config.remove_section('testServer')
#     config.add_section('testServer')
#
#
#     if 'c' in config.options('testServer'):
#         config.remove_option('testServer', 'c')
#         _url = input("请输入测试的站点：")
#         config.set('testServer', 'c', _url)
#
# with open("config.ini", "w", encoding="utf-8") as f:
#     config.write(f)
# #
# #
# # print(config.get('browserType', 'browserName'))
# # print(config.get('testServer', 'c'))
#
#


from selenium import webdriver

driver = webdriver.Chrome()  # 创建浏览器对象  谷歌浏览器
driver.get('https://erp-scm1.whgxwl.com/YX_kVc2yo2cmw0U/')  # 访问网址 百度
print(dir(driver))
